<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use EloquentFilter\Filterable;
use App\Models\Traits\Admin\ActionButtonTrait;
use Illuminate\Support\Facades\DB;
class Cloudimage extends Model
{
    //
    use Filterable, ActionButtonTrait;

    protected $appends = ['actionButton'];
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $actionUri = 'cloudimage';

    protected $fillable = [
        'images_name','image_url','type','cloud_image','base64_image'
    ];

    static public function getcloudimg(){

        $cloudimg = DB::table('manager_third_auths')->first();
        return $cloudimg;
    }


    public function CloudimageType()
    {
        return $this->belongsTo(CloudimageType::class, 'category_id','id');
    }
}
